<div id="top-panel">
    <div id="panel">
        <ul>            
			<li><a href="<?php echo site_url("users"); ?>" class="report_seo">List</a></li>			
        </ul>
    </div>
</div>
<div id="wrapper">
	<div id="content">
		<div id="rightnow">
			<h3 class="reallynow">Create user</h3>
			<div>
				<?php echo validation_errors(); ?>
			</div>
			<?php echo form_open('users/save') ?>
			<input type="hidden" name="id" value="<?php echo isset($users['id']) ? $users['id'] : "";  ?>" />
			<table width="100%">
				<tr>
					<td>Username</td>
					<td><input type="text" name="username" class="input" value="<?php echo isset($users['username']) ? $users['username'] : ""; ?>" /></td>
				</tr>
				<tr>
					<td>Password</td>
					<td><input type="password" name="password" class="input" /></td>
				</tr>
				<tr>
					<td>Password Confirm</td>
					<td><input type="password" name="password_confirm" class="input" /></td>
				</tr>
				<tr>
					<td>First name</td>
					<td><input type="text" name="fname" class="input" value="<?php echo isset($users['fname']) ? $users['fname'] : ""; ?>" /></td>
				</tr>
				<tr>
					<td>Last name</td>
					<td><input type="text" name="lname" class="input" value="<?php echo isset($users['lname']) ? $users['lname'] : ""; ?>" /></td>
				</tr>
				<tr>
					<td>Email</td>
					<td><input type="text" name="email" class="input" value="<?php echo isset($users['email']) ? $users['email'] : ""; ?>" /></td>
				</tr>
				<tr>
					<td>Status</td>
					<td>
						<input type="radio" name="status" value="1" <?php if(isset($users['status']) && $users['status']==1): ?> checked="checked" <?php endif; ?> />Active
						<input type="radio" name="status" value="0" <?php if(isset($users['status']) && $users['status']==0): ?> checked="checked" <?php endif; ?> />UnActive
					</td>
				</tr>
				<tr>
					<td>Group</td>
					<td>
						<select name="gid" class="input1">
							<?php foreach($group as $v): ?>
								<option value="<?php echo $v['id']; ?>" <?php if(isset($users['gid']) && $users['gid']==$v['id']): ?> selected="selected" <?php endif; ?>><?php echo $v['name']; ?></option>
							<?php endforeach; ?>
						</select>
					</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><input type="submit" value="Save" >
						<input type="button" value="Cancel" class="btcancel" />
					</td>
				<tr>
			</table>
		</div>
	</div>
<div>